package com.lingyue.entity.module.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lingyue.entity.groups.Create;
import com.lingyue.entity.groups.Modify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lizhiyuan
 * @since 2019-11-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cus_veh_relation")
@ApiModel(value="CusVehRelationEntity对象", description="")
public class CusVehRelationEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键", hidden = true)
    @NotNull(groups = Modify.class)
    @TableId(value = "CVR_ID", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "经销商编号")
    @NotNull(groups = Modify.class)
    @TableField("CVR_DEL_ID")
    private Long delId;

    @ApiModelProperty(value = "客户接口唯一码")
    @TableField("CVR_CUS_API_UNIQUE_KEY")
    private String cusApiUniqueKey;

    @ApiModelProperty(value = "车辆接口唯一码")
    @TableField("CVR_VEH_API_UNIQUE_KEY")
    private String vehApiUniqueKey;

    @ApiModelProperty(value = "车架号")
    @TableField("CVR_VEH_VIN")
    private String vehVin;

    @ApiModelProperty(value = "客户编号")
    @NotEmpty(groups = Create.class)
    @TableField("CVR_CUSTOMER_ID")
    private String customerId;

    @ApiModelProperty(value = "车辆主要联系人：Y/N:默认", example = "Y")
    @NotEmpty(groups = Create.class)
    @TableField("CVR_CONTACT_FLAG")
    private String contactFlag;

    @ApiModelProperty(value = "客户类型：售后联系人/车主等，O – Owner，A – AfterSales Contact，B – Both，N – Null", example = "B")
    @NotEmpty(groups = Create.class)
    @TableField("CVR_CUSTOMER_TYPE")
    private String customerType;

    @ApiModelProperty(value = "是否有效：Y:有效/N:无效", example = "Y")
    @TableField("CVR_DEL_UPDATE_FLAG")
    private String delUpdateFlag;

    @TableField("CVR_CREATE_USER")
    private String createUser;

    @ApiModelProperty(example = "2019-11-27 10:20:45")
    @TableField("CVR_CREATE_DATE")
    private LocalDateTime createDate;

    @TableField("CVR_UPDATE_USER")
    private String updateUser;

    @ApiModelProperty(example = "2019-11-27 10:20:45")
    @TableField("CVR_UPDATE_DATE")
    private LocalDateTime updateDate;


    public static final String CVR_ID = "CVR_ID";

    public static final String CVR_DEL_ID = "CVR_DEL_ID";

    public static final String CVR_CUS_API_UNIQUE_KEY = "CVR_CUS_API_UNIQUE_KEY";

    public static final String CVR_VEH_API_UNIQUE_KEY = "CVR_VEH_API_UNIQUE_KEY";

    public static final String CVR_VEH_VIN = "CVR_VEH_VIN";

    public static final String CVR_CUSTOMER_ID = "CVR_CUSTOMER_ID";

    public static final String CVR_CONTACT_FLAG = "CVR_CONTACT_FLAG";

    public static final String CVR_CUSTOMER_TYPE = "CVR_CUSTOMER_TYPE";

    public static final String CVR_DEL_UPDATE_FLAG = "CVR_DEL_UPDATE_FLAG";

    public static final String CVR_CREATE_USER = "CVR_CREATE_USER";

    public static final String CVR_CREATE_DATE = "CVR_CREATE_DATE";

    public static final String CVR_UPDATE_USER = "CVR_UPDATE_USER";

    public static final String CVR_UPDATE_DATE = "CVR_UPDATE_DATE";

}
